<?
$this->Html->css('/js/libs/redactor/css/redactor.css', null, array('inline' => false));
$this->Html->script('libs/redactor/redactor.min', array('inline' => false, 'block' => 'scriptBottom'));
$this->Html->scriptBlock('$(document).ready(function(){$(\'#ChapterDesc\').redactor({ autoresize: true, cleanUp: true, convertDivs: false, removeClasses: false, imageUpload: \'/admin/images/upload\', imageGetJson: \'/admin/images/uploads.json\'});});', array('inline' => false, 'block' => 'scriptBottom'));
?><div class="chapters form">
    <?php echo $this->Form->create('Chapter'); ?>
    <fieldset>
        <legend><?php echo __('Admin Add Chapter'); ?></legend>
        <?php
        echo $this->Form->input('name', array('placeholder' => 'Chapter name'));
        echo $this->Form->input('gp_page', array('placeholder'=>'Google + page ID','label'=>'Google + page ID'));
        echo $this->Form->input('url', array('placeholder' => 'External profile URL'));
        echo $this->Form->input('slug', array('placeholder' => 'Leave empty for auto'));
        echo $this->Form->input('desc', array('placeholder'=> 'Chapters description'));
        echo $this->Form->input('image', array('type'=> 'hidden'));
        echo $this->Upload->add('ChapterImage',array('path'=>'static/gdglogo'));
        ?>
    </fieldset>
    <?php echo $this->Form->end(__('Submit')); ?>
</div>
<div class="actions">
    <h3><?php echo __('Actions'); ?></h3>
    <ul>

        <li><?php echo $this->Html->link(__('List Chapters'), array('action' => 'index')); ?></li>
        <li><?php echo $this->Html->link(__('List Events'), array('controller' => 'events', 'action' => 'index')); ?> </li>
        <li><?php echo $this->Html->link(__('New Event'), array('controller' => 'events', 'action' => 'add')); ?> </li>
        
    </ul>
</div>
